# Smallest pan-digital prime.
What is the smallest prime number containing each of the 10 digits from 0 to 9 at least once?
The unit place can only be 1, 3, 7, 9.
Since 0 + 1 + 2 + ... + 9 = 45, which is a multiple of 3, we know we need to use more than 10 digits.
So say it has 11 digits. Then we have one repeated digit. The smallest such possibility is if 1 is repeated and it starts with 1.
The smallest candidates would then be 10xxxxxxxxxx, where xxxxxxxxxx is a permutation of 1 through 9.
Now we can brute force 9! = 362880 many possibilities. We can prune by assuming it would start with 1012xxxxxxx. With a computer, giving us 10123457689.